<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .parent{
            width: 400px;
            height: 100px;
            background: #999;
            display: flex;
            position: relative;
            align-items: center;
            margin: 100px auto;
            overflow: hidden;
        }
        .item{
            display: flex;
            /* -webkit-animation: tickerScroll 10s linear infinite normal; */
            animation: tickerScroll 10s linear infinite normal;
            /* -webkit-transform: translateX(0); */
            transform: translateX(0);
        }
        .parent:hover .item{
            animation-play-state: paused; /* 悬停时暂停动画 */
        }
        .num{
            border: solid 1px #f0f0f0;
            display: flex;
            justify-content: center;
            align-items: center;
            background: #333;
            color: #fff;
            width: 80px;
            height: 40px;
        }
        @keyframes tickerScroll {
            0% {
                opacity: 1;
                /* -webkit-transform: translateX(0); */
                transform: translateX(0);
            }
            100% {
                opacity: 1;
                /* -webkit-transform: translateX(-100%); */
                transform: translateX(-100%);
            }
        }
    </style>
</head>
<body>
    <div class="parent">
        <div class="item">
            <div class="num">1</div>
            <div class="num">2</div>
            <div class="num">3</div>
            <div class="num">4</div>
            <div class="num">5</div>
        </div>
        <div class="item">
            <div class="num">1</div>
            <div class="num">2</div>
            <div class="num">3</div>
            <div class="num">4</div>
            <div class="num">5</div>
        </div>
    </div>
</body>
</html>